package com.qunar.toku.handler;

import org.jboss.netty.channel.Channel;

import com.qunar.toku.proxy.RequestProtocol;


public final class ClientHandler extends ChannelClientHandler {

	@Override
	protected void execute(Channel channel, Object message) {
		RequestProtocol protocol = (RequestProtocol) message;
		//客户端根据token获取对应的匿名函数，并将服务器的处理结果应用到此函数上
		ResultHandler r = invokeMap.remove(protocol.getKey());
		r.processor(protocol.getMessage());
	}

}
